<!--{template header}-->
<div class="panel clearfix">
    <div class="grid_17">
        <div class="prefix_1 suffix_1">
            <!--from表单 start-->
            <div class="clearfix box font14">
                <form id="frm_tenpay" method="post" action="$reqUrl" target="_blank" enctype="application/x-www-form-urlencoded">
                    <div class="data_list mt_10">
                        <table cellpadding="0" cellspacing="0" class="data_table">
                            <thead>
                                <tr>
                                    <th scope="col">
                                    </th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>
                                        充值金额：<span class="red"><!--{eval printf('%10.2f',$cash)}--></span>
                                        元 
                                        <select name="currency_code">
                                            <option value="USD">USD</option>
                                            <option value="GBP">GBP</option>
                                            <option value="EUR">EUR</option>
                                            <option value="JPY">JPY</option>
                                            <option value="CAD">CAD</option>
                                            <option value="AUD">AUD</option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <img src="payment/{$payment_config[pay_dir]}/{$payment_config[img]}" align="absmiddle">财付通交易，推荐QQ用户使用
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <button type="button" name="btn_confirm_pay" onclick="return confirm_tenpay_pay(this);" value="确认付款">
                                        <span class="check icon"></span>确认付款</a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </form>
            </div>
            <!--from表单 end-->
        </div>
    </div>
    <div>
        <script type="text/javascript">
            function confirm_tenpay_pay(obj){
                var url = 'index.php?do=user&view=finance&op=recharge&step=step2&pay_type=online_charge&ajax=order';
                $.ajax({
                    type: "POST",
                    url: url,
                    cache: false,
                    async: false,
                    data: 'uid=$uid&username=$username&cash=$cash&pay_m=$pay_m&type=$type&obj_id=$obj_id',
                    dataType: "json",
                    error: function(json){
                        showDialog('系统繁忙，请稍后再试!', 'alert', '错误提示', '', 1);
                    },
                    success: function(json){
                        if (json.status == 0) {
                            showDialog('提交失败，请稍后再试!', 'alert', '错误提示', '', 1);
                        }
                        else {
                            $("#frm_tenpay").attr('action', json.data.url);
                            obj.form.submit();
                        }
                    }
                });
            }
            
        </script>
<!--{template footer}-->